package com.itheima06;

import java.util.concurrent.Callable;

public class Test {
    public static void main(String[] args) {
        Cat c=new Cat();
        method(c);

    }
    public static  void method(Animal a){
        a.eat();
        if(a instanceof Cat){
          Cat catchMouse=(Cat)a;
          ((Cat) a).catchMouse();
        }
    }
}
